<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<a href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
<a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
<!-- 在复制时(如按下 ctrl+v)触发事件 -->
<input type="text" ng-copy="copiedFn()" ng-init="copied=false; value = 'cope me'" ng-model="value"/>copied: {{copied}}
<script src="../../../../../../../bower_components/angular/angular.js"></script>
<script>
    var $injector = angular.injector(['ng']);
    $injector.invoke(function ($rootScope, $compile, $document) {
        $compile($document)($rootScope);
        $rootScope.copiedFn = function () {
            $rootScope.copied = true;
            alert('copied!');
        };
        $rootScope.$digest();
    });
</script>
</body>
</html>